<!--// header //--> 
{include="../public/header"}
<style>
    .the-legend {
        border-style: none;
        border-width: 0;
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 0;
    }
    .the-fieldset {
        border: 2px groove threedface #444;
        -webkit-box-shadow:  0px 0px 0px 0px #000;
        box-shadow:  0px 0px 0px 0px #000;
    }
</style>
<!--主体内容-->
<!--当前操作-->
<div style="margin-left:65px; margin-right:65px; width:auto">
    <div class="row-fluid">
        <div class="span12">
            <h2 style="margin:12px; color:#41516a"><a href="/System/index">系统管理</a></h2>
        </div>
    </div>		
    <!--当前操作-->
    <div class="row-fluid">
        <div class="span12">
            <div class="row-fluid">
                <!--tab-->
                <div class="tabbable">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#1" data-toggle="tab"><font color="orange">课程列表</font></a></li>
                        <li><a href="#2" data-toggle="tab">课程新增</a></li>
                        <li><a href="#3" data-toggle="tab">员工列表</a></li>
                        <li><a href="#4" data-toggle="tab">员工新增</a></li>
                        <li><a href="#5" data-toggle="tab">班级列表</a></li>
                        <li><a href="#6" data-toggle="tab">班级新增</a></li>
                        <li><a href="#7" data-toggle="tab">权限管理</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="1">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <!-- <th>状态</th>-->
                                        <th>课程名称</th>
                                        <th>应收费用</th>
                                        <th>其他备注</th>
                                        <th>管理</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {loop="course"}
                                    <tr>
                                        <td>{$value.id}</td>
                                        <!--<td>{$value.status}</td>-->
                                        <td>{$value.cName}</td>
                                        <td>{$value.cTotalfee} 元/人 </td>
                                        <td>{$value.cMemo}</td>
                                        <td>
                                            <a href="/System/edit/id/{$value.id}" alt="编辑" title="编辑"><i class="icon-edit"></i></a>
                                            <a href="/System/destory/id/{$value.id}" alt="删除" title="删除" onclick="return confirm('确定要删除此课程吗?')"><i class="icon-trash"></i></a>
                                        </td>
                                    </tr>
                                    {/loop}
                                </tbody>
                            </table>
                        </div>
                        <div class="tab-pane" id="2">
                            <form name="frm" method="post" action="/System/create" onsubmit="return validate()">
                                <div class = 'form-horizontal well'>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">课程信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>课程名称
                                                    <input type="text" name="cName" id="cName"  /></label>
                                            </div>
                                            <div class="span4">
                                                <label>课程费用
                                                    <input type="text" name="cTotalfee" id="cTotalfee" placeholder="直接填写金额" onkeyup="value=value.replace(/[^\d]/g,'')" /></label>	
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>其他备注
                                                    <textarea name="cMemo"></textarea></label>	
                                            </div>
                                        </div>     
                                        <div class="row-fluid show-grid">
                                            <div class="span4"></div>
                                            <div class="span4">
                                                <label>
                                                    <input type="hidden" value="course" name="doaction" />
                                                    <input type="submit" value="确认新增" />
                                                </label>	
                                            </div>
                                        </div>     
                                    </fieldset>
                                </div>
                            </form>
                        </div>
                        <div class="tab-pane" id="3">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>状态</th>
                                        <th>姓名</th>
                                        <th>登录名</th>
                                        <th>手机</th>
                                        <th>部门</th>
                                        <th>职务</th>
                                        <th>学历</th>
                                        <th>入职时间</th>
                                        <th>管理</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {loop="employee"}
                                    <tr>
                                        <td>{if condition="$value.status == 1"}在职{else}离职{/if}</td>
                                        <td>{$value.nick}</td>
                                        <td>{$value.login}</td>
                                        <td>{$value.etelephone}</td>
                                        <td>{$value.edept}</td>
                                        <td>{$value.edeptwork}</td>
                                        <td>{$value.egrade}</td>
                                        <td>{function="date('Y-m-d',$value.ehere)"}</td>
                                        <td>
                                            <a href="/System/emptedit/id/{$value.id}" alt="编辑" title="编辑"><i class="icon-edit"></i></a>
                                            <a href="/System/emptdestory/id/{$value.id}" alt="删除" title="删除" onclick="return confirm('确定要删除此员工档案吗?')"><i class="icon-trash"></i></a>
                                        </td>
                                    </tr>
                                    {/loop}
                                </tbody>
                            </table>
                        </div>
                        <div class="tab-pane" id="4">
                            <form name="frm" method="post" action="/System/create" onsubmit="return empvalidate()">
                                <div class = 'form-horizontal well'>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">基本信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>姓名
                                                    <input type="text" name="nick" id="nick" placeholder="例如:张三"  /></label>
                                            </div>
                                            <div class="span4">
                                                <label>身份
                                                    <input type="text" name="ecardid" id="ecardid" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="填写身份证号码" />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>生日
                                                    <input type="text" name="ebirth" id="ebirth" placeholder="格式:xxxx-xx-xx" />
                                                </label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>性别
                                                    <input type="radio" name="esex" value="0" checked />男
                                                    <input type="radio" name="esex" value="1" />女
                                                </label>	
                                            </div>
                                            <div class="span4">
                                                <label>婚否
                                                    <input type="radio" name="emarriage" value="0" checked />未婚
                                                    <input type="radio" name="emarriage" value="1" />已婚
                                                </label>	
                                            </div>
                                            <div class="span4">
                                                <label>户籍
                                                    <input type="text" name="efrom" id="efrom"  /></label>	
                                            </div>
                                        </div>     
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>毕业院校
                                                    <input type="text" id="egraduate" name="egraduate"  />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>专业
                                                    <input type="text" id="esubject" name="esubject"  />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>学历
                                                    <input type="text" id="egrade" name="egrade"  />
                                                </label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>家庭住址
                                                    <input type="text" id="eaddress" name="eaddress"  />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>手机
                                                    <input type="text" id="etelephone" name="etelephone" onkeyup="value=value.replace(/[^\d]/g,'')" />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>应急
                                                    <input type="text" id="econtact" name="econtact" placeholder="应急人联系方式" onkeyup="value=value.replace(/[^\d]/g,'')" />
                                                </label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>入职时间
                                                    <input type="text" id="ehere" name="ehere" placeholder="格式:xxxx-xx-xx" />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>部门
                                                    <select name="edept" id="edept">
                                                        <option value="市场部">市场部</option>
                                                        <option value="教务处">教务处</option>
                                                        <option value="管理组">管理组</option>
                                                    </select>
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>职务
                                                    <input type="text" id="edeptwork" name="edeptwork"  />
                                                </label>
                                            </div>
                                        </div>
                                    </fieldset>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">管理系统信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>登录帐号
                                                    <input type="text" name="login" id="login" placeholder="例如:zhangs" />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>登录密码
                                                    <input type="password" name="passwd" id="passwd" placeholder="设置管理系统登录密码" />
                                                </label>
                                            </div>
                                            <div class="span4">
                                                <label>确认密码
                                                    <input type="password" name="repasswd" id="repasswd" placeholder="再确认一下" />
                                                </label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>所属分组
                                                    <select name="gid" id="gid">
                                                        <option value="1">市场部</option>
                                                        <option value="2">教务处</option>
                                                        <option value="3">管理组</option>
                                                    </select>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4"></div>
                                            <div class="span4">
                                                <label>
                                                    <input type="hidden" value="account" name="doaction" />
                                                    <input type="submit" value="确认新增" />
                                                </label>	
                                            </div>
                                        </div>     
                                    </fieldset>
                                </div>
                            </form>
                        </div>
                        <div class="tab-pane" id="5">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>状态</th>
                                        <th>班级名称</th>
                                        <th>班主任</th>
                                        <th>开班时间</th>
                                        <th>上课时间</th>
                                        <th>其他说明</th>
                                        <th>管理</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {loop="grade"}
                                    <tr>
                                        <td>{$value.id}</td>
                                        <td>{if condition="$value.status == 1"}已开班{else}未开班{/if}</td>
                                        <td><a href="/Student/grade/id/{$value.id}" alt="查看班级学生" title="查看班级学生">{$value.gname}</a></td>
                                        <td>{$value.gteacher}</td>
                                        <td>{function="date('Y-m-d',$value.gopen)"}</td>
                                        <td>{$value.gclass}</td>
                                        <td>{$value.gmemo}</td>
                                        <td>
                                            <a href="/System/grdedit/id/{$value.id}" alt="编辑" title="编辑"><i class="icon-edit"></i></a>
                                            <a href="/System/grddestory/id/{$value.id}" alt="删除" title="删除" onclick="return confirm('确定要删除此班级信息吗?')"><i class="icon-trash"></i></a>
                                        </td>
                                    </tr>
                                    {/loop}
                                </tbody>
                            </table>
                        </div>
                        <div class="tab-pane" id="6">
                            <form name="frm" method="post" action="/System/create" onsubmit="return clsvalidate()">
                                <div class = 'form-horizontal well'>
                                    <fieldset class="well the-fieldset">
                                        <legend class="the-legend">班级信息</legend>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>班级名称
                                                    <input type="text" name="gname" id="gname" /></label>
                                            </div>
                                            <div class="span4">
                                                <label>班主任
                                                    <input type="text" name="gteacher" id="gteacher" /></label>	
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>开班时间
                                                    <input type="text" name="gopen" id="gopen" placeholder="格式:xxxx-xx-xx" /></label>
                                            </div>
                                            <div class="span4">
                                                <label>上课时间
                                                    <input type="text" name="class" id="gclass" placeholder="格式:xxxx-xx-xx" /></label>
                                            </div>
                                        </div>
                                        <div class="row-fluid show-grid">
                                            <div class="span4">
                                                <label>其他备注
                                                    <textarea name="gmemo"></textarea></label>	
                                            </div>
                                        </div>     
                                        <div class="row-fluid show-grid">
                                            <div class="span4"></div>
                                            <div class="span4">
                                                <label>
                                                    <input type="hidden" value="grade" name="doaction" />
                                                    <input type="submit" value="确认新增" />
                                                </label>	
                                            </div>
                                        </div>     
                                    </fieldset>
                                </div>
                            </form>
                        </div>
                        <div class="tab-pane" id="7">
                            <form name="actions" method="post" action="/System/dogrant" />
                        <table class="table table-bordered">
                            <thead>
                            <tr><td>选择用户</td><td>
                            <select name="eid">
                            {loop="account"}
                              <option value="{$value.id}">{$value.nick}</option>
                            {/loop}  
                            </select>
                            </td></tr>
                                <tr>
                                    <td colspan="2">禁止访问列表</td>
                                </tr>
                            </thead>
                            <tr><td></td><td>
                        {loop="action"}
                        <span>{$value.name}<input type="checkbox" name="aids[]" value="{$value.id}" />&nbsp;</span>
                        {/loop}
                        </td></tr>
                        <tr><td></td><td><input type="submit" value="确认授权" /></td></tr>
                        </table>
                        </form>
                        </div>
                    </div>
                </div>
                <!--tab-->
            </div>
        </div>
    </div>
    <!--主体内容-->
    <script>
        <!--course-->
        function validate(){
            var cName = $("#cName").val();
            var cTotalfee = $("#cTotalfee").val();
            if(cName == '' || cTotalfee == ''){
                alert('课程信息填写不完整!');
                return false;
            }
        }
        <!--empt-->
        function empvalidate(){
            var nick = $("#nick").val();
            var ecardid = $("#ecardid").val();
            var efrom = $("#efrom").val();
            var ebirth = $("#ebirth").val();
            var egraduate = $("#egraduate").val();
            var esubject = $("#esubject").val();
            var egrade = $("#egrade").val();
            var eaddress= $("#eaddress").val();
            var etelephone = $("#etelephone").val();
            var econtact = $("#econtact").val();
            var ehere = $("#ehere").val();
            var edept = $("#edept").val();
            var edeptwork = $("#edeptwork").val();
            var login = $("#login").val();
            var passwd = $("#passwd").val();
            var gid = $("#gid").val();
            if(nick == '' || ecardid == '' || efrom == '' || ebirth == '' || egraduate== '' || esubject == '' || egrade == '' || eaddress == '' || etelephone == '' || econtact == '' || ehere == '' || edept == '' || edeptwork == '' || login == '' || passwd == '' || gid == ''){
                alert('帐号信息填写不完整!');
                return false;
            }
        }
        <!--class-->
        function clsvalidate(){
            var gname = $("#gname").val();
            var gteacher = $("#gteacher").val();
            if(gname == '' || gteacher == ''){
                alert('班级信息填写不完整!');
                return false;
            }
        }
    </script>
    <!--// footer //--> 
    {include="../public/footer"}
